import Vue from 'vue'
import Router from 'vue-router'
import home from "@/view/Home"
// 异步组件

const Area = () =>
    import ('../view/Area/area.vue');
const hesuan = () =>
    import ('@/view/hesuan/hesuan.vue');
const Prevention = () =>
    import ('../view/Prevention/precention.vue');
const Travel = () =>
    import ('../view/Travel/travel.vue');
const city = () =>
    import ('../view/city/city.vue');


Vue.use(Router)

export default new Router({
    routes: [{
            path: '/',
            name: 'HelloWorld',
            component: home

        }, {
            path: '/area',
            name: 'area',
            component: Area
        }, {
            path: '/hesuan',
            name: 'hesuan',
            component: hesuan
        }, {
            path: '/Prevention',
            name: 'prevention',
            component: Prevention
        }, {
            path: '/travel',
            name: 'travel',
            component: Travel
        },
        {
            path: '/city/:cityname',
            name: 'city',
            component: city,
            props: true
        }

    ]
})
